﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DevComponents.DotNetBar.SuperGrid;
using AppCommon;

namespace SyncConfig.Dialog
{
    public partial class PickTable : BaseDialog
    {
        public DataRowView SelectedRow;
        public string WhereCondition{get;set;}
        
        public PickTable()
        {
            InitializeComponent();
        }

        private void superGridControl1_RowDoubleClick(object sender, DevComponents.DotNetBar.SuperGrid.GridRowDoubleClickEventArgs e)
        {

            GridRow row = e.GridRow as GridRow;
            SelectedRow = row.DataItem as DataRowView;
            DialogResult = DialogResult.OK;
        }

        private void PickTable_Load(object sender, EventArgs e)
        {
            DataTable tblData = ADOSyncConfig.GetAllTables(WhereCondition);
            
          
            tblData.AcceptChanges();
            superGridControl1.PrimaryGrid.DataSource = tblData;
        }
    }
}
